<script>
/*cookie,取_cookie(name),设置_cookie(name, '值', {expires: 天, path: '/'})*/
_cookie = function(name, value, options) {
    if (typeof value != 'undefined') {
        options = options || {};
        if (value === null) {
            value = '';
            options.expires = -1
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000))
            } else {
                date = options.expires
            }
            expires = '; expires=' + date.toUTCString()
        }
        var path = options.path ? '; path=' + options.path: '';
        var domain = options.domain ? '; domain=' + options.domain: '';
        var secure = options.secure ? '; secure': '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('')
    } else {
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = (cookies[i] || '').replace(/^\s+|\s+$/g, '');
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break
                }
            }
        }
        return cookieValue
    }
};
/*id选择器*/
function gId(v){return document.getElementById(v);}
/*判断cookie是否开启*/
function detectCookie(){return navigator.cookieEnabled?true:false;}
/*金三角*/
function _w1(id,url){
	if(detectCookie()){
		_cookie(id, '1', {expires: 15, path: '/'});
		gId(id).innerHTML = '<iframe src='+url+'></iframe>';
	}
}
</script>
<?php
if(!isset($_COOKIE['w1c5566232'])){
	setcookie('w1c5566232', '1', time()+ 86400 * 15, '/', null, null, true);
	echo "<style>#w1c5566232{display:none;}</style><div id='w1c5566232'></div><script>_w1('w1c5566232','http://s.click.taobao.com/t_9?p=mm_29786743_2748885_9813962&l=http%3A%2F%2Fmall.taobao.com%2F&eventid=101766');</script>";
}
?>